#!/bin/sh
yum install java -y
yum install redis -y
yum install telnet -y
wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
yum localinstall mysql57-community-release-el7-11.noarch.rpm -y
yum install mysql-community-server -y

wget -P /etc/ -N www.loveyukari.com/yukari/file/redis.conf
systemctl start mysqld
systemctl start redis

systemctl enable mysqld
systemctl enable redis

initPassword=`grep "temporary password" /var/log/mysqld.log | awk '{print $NF}'`
mysql -uroot -p$initPassword -e "set global validate_password_policy=0;"
mysqladmin -uroot -p$initPassword password ysh775240